//
//  MZDecimalDemoView.h
//  MZBaseDemo
//
//  Created by Chris Yang on 2016/12/5.
//  Copyright © 2016年 Chris Yang. All rights reserved.
//

#import <UIKit/UIKit.h>

@class MZDecimalDemoView;

@protocol MZDecimalDemoViewDelegate <NSObject>

- (void)demoView:(MZDecimalDemoView *)view buttonClickedAtIndex:(NSInteger)index;

@end

@interface MZDecimalDemoView : UIView

@property (nonatomic, weak) id<MZDecimalDemoViewDelegate>delegate;

@property (nonatomic, strong) UITextField *leftField;
@property (nonatomic, strong) UIButton *opButton;
@property (nonatomic, strong) UITextField *rightField;
@property (nonatomic, strong) UITextField *resultField;

@property (nonatomic, strong) UIButton *decimalCalcButton;
@property (nonatomic, strong) UIButton *stringCalcButton;
@property (nonatomic, strong) UIButton *numberCalcButton;
@property (nonatomic, strong) UIButton *scaleButton;

/* Get */
- (NSString *)leftVal;
- (NSString *)rightVal;
- (NSString *)resultVal;

/* Update */
- (void)updateOpString:(NSString *)opStr;
- (void)updateResult:(NSString *)result;
- (void)updateScale:(NSInteger)scale;

@end
